Summary
A networkable list for use with the <see cref="T:Sandbox.SyncAttribute" /> and <see cref="T:Sandbox.HostSyncAttribute" />. Only changes will be
networked instead of sending the whole list every time, so it's more efficient.
<br /><para><b>Example usage:</b><code>
public class MyComponent : Component
{
[Sync] public NetList<int> MyIntegerList { get; set; } = new();
<br />
public void AddNumber( int number )
{
if ( IsProxy ) return;
MyIntegerList.Add( number );
}
}
</code></para>
Properties
Count |
<inheritdoc cref="P:System.Collections.Generic.List`1.Count" /> |
Item |
|
Methods